home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Testing & Debugging / Mac OS Development Toolkit / Automation Essentials 2.3.0 / Host Automation Folder / SPEC Libs / WordProcessor.Lib < prev    next >
Encoding:
Text File  |  1998-03-19  |  2.4 KB  |  73 lines  |  [TEXT/MPS ]

  1. #
  2. # ****************************************************************************
  3. #
  4. #    File Name:        WordProcessor.Lib
  5. #
  6. #    Contains:    xxx put contents here xxx
  7. #
  8. #    Written by:    KTA, KL, ML, GS et al
  9. #
  10. #    Copyright:    © 1993-1994 by Apple Computer, Inc., all rights reserved.
  11. #
  12. # ****************************************************************************
  13. #            C h a n g e        H i s t o r y (most recent first):
  14. # ****************************************************************************
  15. #
  16. #        Vers      Date        Author        Description
  17. #        ----    --------    ------    ---------------------------------------------
  18. #     <1.0.4>     12/7/94    ML        Added Exception Handling support
  19. #     <1.0.3>     4/14/94    ML        Define gWindowInset
  20. #        <1+>     5/21/93    NAGA        Adding header and porting old files to follow new standards
  21. #
  22. # ****************************************************************************
  23. #
  24.  
  25. ########################################################################
  26. #                            External libraries 
  27. #=======================================================================
  28. Libraries  "DoTasks.Lib","UserInterface.Lib", "ExceptionHandling.Lib";
  29.  
  30. #########################################################################
  31. #                        DoWPTools()
  32. #========================================================================
  33. # Author:        ML
  34. # Description:    Test Word Processor Tools.
  35. # Parameters:    RulerRect,TabToolList,OtherToolList,SelectAllFlag
  36. # Returns:        Nada
  37. # Examples:        DoWPTools();
  38. # Assumptions:    Word
  39. #========================================================================
  40. # History:
  41. # ML    11/29/94    Added Exception Handling support
  42. ########################################################################
  43. TASK DoWPTools()#(RulerRect,TabToolList,OtherToolList,SelectAllFlag:=0)
  44. begin
  45.     global RulerMenuPath,RulerRect,TabToolList,OtherToolList,SelectAllFlag;
  46.     
  47.     if (RulerMenuPath)
  48.     begin
  49.         myMenuItem :=  RulerMenuPath[1];
  50.         myMenu :=  RulerMenuPath[2];
  51.     end;
  52.  
  53.     if (_matchBoolean ([menu t:myMenu e:true i:{ [menuitem t:myMenuItem e:true]}]!))
  54.         selectmenuitem(RulerMenuPath[1],RulerMenuPath[2]);
  55.     
  56.     if SelectAllFlag
  57.         SelectMenuItem ("Select All", "Edit");
  58.     
  59.     # do the following in the script    
  60.  
  61.     theDesc := FindWindow(0);
  62.     rect := theDesc.r;
  63.     bottomInset := rect[4]-rect[2]-RulerRect[4];
  64.     rightInset := rect[3]-rect[1]-RulerRect[3];
  65.     global gWindowInset := {RulerRect[1],RulerRect[2],rightInset,bottomInset};
  66.     
  67.     global gToolList:= TabToolList;
  68.     DoDraw(2);
  69.     
  70.     global gToolList:= OtherToolList;
  71.     DoDraw(2);
  72.     
  73. end;